----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/table2b.log
  log type:  text
 opened on:   3 Dec 2023, 18:17:35

. 
. version 16      

. 
. use "$data/acsmergeddata.dta", clear

. 
. **for text
. gen pop1=perwt*(poor==0)*(incwage>40000 & incwage<80000)

. gen pop2=spouseperwt*(poor==0)*((totincwage-incwage)>40000 & (totincwage-incwage
> )<80000)

. gen statpop=pop1+pop2

. egen totadults=sum(statpop)

. di totadults
14086576

. drop pop1 pop2 statpop totadults

. 
. *** total adults
. gen pop=(perwt + spouseperwt)

. egen totadults=sum(pop)

. di totadults
63164152

. drop pop

. 
. gen pop=(newnumkidswt17)

. egen totkids=sum(pop)

. di totkids
72755400

. drop pop

. 
. ** total effect on poverty
. gen pooradults=(age>=18)*poor*(perwt+spouseperwt)

. egen totpooradults=sum(pooradults)

. 
. gen nolongerpooradults=(age>=18)*poor*(poorctc21==0)*(perwt+spouseperwt)

. egen totnolongerpooradults=sum(nolongerpooradults)

. 
. gen stillpooradults=(age>=18)*poor*(poorctc21==1)*(perwt+spouseperwt)

. egen totstillpooradults=sum(stillpooradults)

. 
. di totadults
63164152

. di totpooradults
7558882

. di totstillpooradults
5800821

. di totnolongerpooradults
1758061

. 
. di totpooradults/totadults
.11967044

. di (totstillpooradults)/totadults
.09183723

. 
. rename (perwt spouseperwt) (asecwt spouseasecwt)

. 
. * row 1
. gen double group=(married==0)*(incwage>0)*(v25>0)*(agi2017<80000)*(calckids>0)*(
> samplejustwomen==1)

. 
. gen double group1=asecwt*avgtax*.4*group

. egen totgroup1a=sum(group1)

. 
. gen double group2=asecwt*avgtax*.4*group*poor

. egen totgroup2a=sum(group2)

. 
. gen double group3=asecwt*avgtax*.4*group*(poor==0)

. egen totgroup3a=sum(group3)

. 
. gen double group4=asecwt*avgtax*.4*group*(poor==0)*poorctc21nother

. egen totgroup4a=sum(group4)

. 
. gen double group5=asecwt*avgtax*.4*group*(poor==1)*(poorctc21==0)*poorctc21nothe
> r

. egen totgroup5a=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(303,800 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(303,800 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/asecwt+group5/asecwt)/(group)
(303,800 missing values generated)

. 
. egen pop=sum(group*asecwt)

. forvalues i=1/3{
  2.         egen povnum`i'a=sum(pov`i'*asecwt)
  3.         gen povrate`i'=povnum`i'a/pop
  4.         }

.         
. gen totgroup45a=totgroup4a+totgroup5a   

. sum pop totgroup1a totgroup2a totgroup45a povnum1a povnum2a povnum3a povrate1 po
> vrate2 povrate3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         pop |    356,390     6760784           0    6760784    6760784
  totgroup1a |    356,390    263213.4           0   263213.4   263213.4
  totgroup2a |    356,390    58954.81           0   58954.81   58954.81
 totgroup45a |    356,390    106134.3           0   106134.3   106134.3
    povnum1a |    356,390     1721249           0    1721249    1721249
-------------+---------------------------------------------------------
    povnum2a |    356,390     1253720           0    1253720    1253720
    povnum3a |    356,390     1359854           0    1359854    1359854
    povrate1 |    356,390    .2545931           0   .2545931   .2545931
    povrate2 |    356,390      .18544           0     .18544     .18544
    povrate3 |    356,390    .2011385           0   .2011385   .2011385

. 
. di "pov % decrease="
pov % decrease=

. di (povnum1a-povnum3a)/povnum1a
.20996076

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 2
. gen double group=(married==0)*(incwage>0)*(v25==0)*(agi2017<80000)*(calckids>0)*
> (samplejustwomen==1)

. 
. gen double group1=asecwt*avgtax*.2*group

. egen totgroup1b=sum(group1)

. 
. gen double group2=asecwt*avgtax*.2*group*poor

. egen totgroup2b=sum(group2)

. 
. gen double group3=asecwt*avgtax*.2*group*(poor==0)

. egen totgroup3b=sum(group3)

. 
. gen double group4=asecwt*avgtax*.2*group*(poor==0)*poorctc21nother

. egen totgroup4b=sum(group4)

. 
. gen double group5=asecwt*avgtax*.2*group*(poor==1)*(poorctc21==0)*poorctc21nothe
> r

. egen totgroup5b=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(341,442 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(341,442 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/asecwt+group5/asecwt)/(group)
(341,442 missing values generated)

. 
. egen pop=sum(group*asecwt)

. forvalues i=1/3{
  2.         egen povnum`i'b=sum(pov`i'*asecwt)
  3.         gen povrate`i'=povnum`i'b/pop
  4.         }

.         
. gen totgroup45b=totgroup4b+totgroup5b   

. sum pop totgroup1b totgroup2b totgroup45b povnum1b povnum2b povnum3b povrate1 po
> vrate2 povrate3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         pop |    356,390     1784789           0    1784789    1784789
  totgroup1b |    356,390    17859.73           0   17859.73   17859.73
  totgroup2b |    356,390    153.4259           0   153.4259   153.4259
 totgroup45b |    356,390    10550.13           0   10550.13   10550.13
    povnum1b |    356,390       12953           0      12953      12953
-------------+---------------------------------------------------------
    povnum2b |    356,390       10479           0      10479      10479
    povnum3b |    356,390    21029.13           0   21029.13   21029.13
    povrate1 |    356,390    .0072574           0   .0072574   .0072574
    povrate2 |    356,390    .0058713           0   .0058713   .0058713
    povrate3 |    356,390    .0117824           0   .0117824   .0117824

. di "pov % decrease="
pov % decrease=

. di (povnum1b-povnum3b)/povnum1b
-.62349501

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 3
. gen double group=(married==1)*(incwage>0)*(agi2017<80000)*(calckids>0)*(sampleju
> stwomen==1)

. 
. gen double group1=asecwt*avgtax*.2*group

. egen totgroup1c=sum(group1)

. 
. gen double group2=asecwt*avgtax*.2*group*poor

. egen totgroup2c=sum(group2)

. 
. gen double group3=asecwt*avgtax*.2*group*(poor==0)

. egen totgroup3c=sum(group3)

. 
. gen double group4=asecwt*avgtax*.2*group*(poor==0)*poorctc21nother

. egen totgroup4c=sum(group4)

. 
. gen double group5=asecwt*avgtax*.2*group*(poor==1)*(poorctc21==0)*poorctc21nothe
> r

. egen totgroup5c=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(302,348 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(302,348 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/asecwt+group5/asecwt)/(group)
(302,348 missing values generated)

. 
. egen pop=sum(group*asecwt)

. forvalues i=1/3{
  2.         egen povnum`i'c=sum(pov`i'*asecwt)
  3.         gen povrate`i'=povnum`i'c/pop
  4.         }

. 
. gen totgroup45c=totgroup4c+totgroup5c   

. sum pop totgroup1c totgroup2c totgroup45c povnum1c povnum2c povnum3c povrate1 po
> vrate2 povrate3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         pop |    356,390     5654115           0    5654115    5654115
  totgroup1c |    356,390    48523.78           0   48523.78   48523.78
  totgroup2c |    356,390    7364.057           0   7364.057   7364.057
 totgroup45c |    356,390    9871.282           0   9871.282   9871.282
    povnum1c |    356,390      613375           0     613375     613375
-------------+---------------------------------------------------------
    povnum2c |    356,390      476250           0     476250     476250
    povnum3c |    356,390    486121.3           0   486121.3   486121.3
    povrate1 |    356,390    .1084829           0   .1084829   .1084829
    povrate2 |    356,390    .0842307           0   .0842307   .0842307
    povrate3 |    356,390    .0859765           0   .0859765   .0859765

. di "pov % decrease="
pov % decrease=

. di (povnum1c-povnum3c)/povnum1c
.2074648

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 4
. gen double group=(married==1)*(totincwage>incwage)*(agi2017<80000)*(calckids>0)*
> (samplejustwomen==1)

. 
. gen double group1=asecwt*newrtwchangespouse*.05*group

. egen totgroup1d=sum(group1)

. 
. gen double group2=asecwt*newrtwchangespouse*.05*group*poor

. egen totgroup2d=sum(group2)

. 
. gen double group3=asecwt*newrtwchangespouse*.05*group*(poor==0)

. egen totgroup3d=sum(group3)

. 
. gen double group4=asecwt*newrtwchangespouse*.05*group*(poor==0)*poorctc21notspou
> se

. egen totgroup4d=sum(group4)

. 
. gen double group5=asecwt*newrtwchangespouse*.05*group*(poor==1)*(poorctc21==0)*p
> oorctc21notspouse

. egen totgroup5d=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(278,992 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(278,992 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/asecwt+group5/asecwt)/(group)
(278,992 missing values generated)

. 
. egen pop=sum(group*asecwt)

. forvalues i=1/3{
  2.         egen povnum`i'd=sum(pov`i'*asecwt)
  3.         gen povrate`i'=povnum`i'd/pop
  4.         }

.         
. gen totgroup45d=totgroup4d+totgroup5d   

. sum pop totgroup1d totgroup2d totgroup45d povnum1d povnum2d povnum3d povrate1 po
> vrate2 povrate3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         pop |    356,390     8285893           0    8285893    8285893
  totgroup1d |    356,390    26866.16           0   26866.16   26866.16
  totgroup2d |    356,390    4628.904           0   4628.904   4628.904
 totgroup45d |    356,390    14939.75           0   14939.75   14939.75
    povnum1d |    356,390     1072768           0    1072768    1072768
-------------+---------------------------------------------------------
    povnum2d |    356,390      800478           0     800478     800478
    povnum3d |    356,390    815417.8           0   815417.8   815417.8
    povrate1 |    356,390    .1294692           0   .1294692   .1294692
    povrate2 |    356,390    .0966073           0   .0966073   .0966073
    povrate3 |    356,390    .0984104           0   .0984104   .0984104

. di "pov % decrease="
pov % decrease=

. di (povnum1d-povnum3d)/povnum1d
.23989367

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 5: sum up non-mom and potential spouse
. gen person1=(incwage>0)*(agi2017<80000)*(calckids>0)*(samplenotmoms==1)

. gen person2=(totincwage>incwage)*(agi2017<80000)*(calckids>0)*(samplenotmoms==1)
> *(married==1)

. 
. gen double group1=(asecwt*person1+spouseasecwt*person2)*avgtax*.05

. egen totgroup1e=sum(group1)

. 
. gen double group2=(asecwt*person1+spouseasecwt*person2)*avgtax*.05*poor

. egen totgroup2e=sum(group2)

. 
. gen double group3=(asecwt*person1+spouseasecwt*person2)*avgtax*.05*(poor==0)

. egen totgroup3e=sum(group3)

. 
. gen double group4=(asecwt*person1)*avgtax*.05*(poor==0)*poorctc21nother+(spousea
> secwt*person2)*avgtax*.05*(poor==0)*poorctc21notspouse

. egen totgroup4e=sum(group4)

. 
. gen double group5=(asecwt*person1)*avgtax*.05*(poor==1)*(poorctc21==0)*poorctc21
> nother+spouseasecwt*person2*avgtax*.05*(poor==1)*(poorctc21==0)*poorctc21notspou
> se

. egen totgroup5e=sum(group5)

. 
. gen pov1=(poor*(person1*asecwt+person2*spouseasecwt))

. gen pov2=(poorctc21*(person1*asecwt+person2*spouseasecwt))

. gen pov3=(poorctc21*(person1*asecwt+person2*spouseasecwt)+group4+group5)

. 
. egen pop=sum(asecwt*person1+spouseasecwt*person2)

. forvalues i=1/3{
  2.         egen povnum`i'e=sum(pov`i')
  3.         gen povrate`i'=povnum`i'e/pop
  4.         }

. 
. gen totgroup45e=totgroup4e+totgroup5e   

. sum pop totgroup1e totgroup2e totgroup45e povnum1e povnum2e povnum3e povrate1 po
> vrate2 povrate3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         pop |    356,390     2873704           0    2873704    2873704
  totgroup1e |    356,390    10327.42           0   10327.42   10327.42
  totgroup2e |    356,390    1765.378           0   1765.378   1765.378
 totgroup45e |    356,390    5168.648           0   5168.648   5168.648
    povnum1e |    356,390      431746           0     431746     431746
-------------+---------------------------------------------------------
    povnum2e |    356,390      346915           0     346915     346915
    povnum3e |    356,390    352083.7           0   352083.7   352083.7
    povrate1 |    356,390    .1502402           0   .1502402   .1502402
    povrate2 |    356,390    .1207205           0   .1207205   .1207205
    povrate3 |    356,390    .1225191           0   .1225191   .1225191

. di "pov % decrease="
pov % decrease=

. di (povnum1e-povnum3e)/povnum1e
.18451206

. drop pov1 pov2 pov3 povrate* group5 group* pop

. 
. gen pop=(asecwt*(incwage>0) + spouseasecwt*(totincwage>incwage))*(agi2017<80000)

. egen totpop=sum(pop)

. 
. forvalues i=1/2{
  2.         di totgroup`i'a+totgroup`i'b+totgroup`i'c+totgroup`i'd+totgroup`i'e
  3. }
366790.5
72866.577

. di totgroup4a+totgroup4b+totgroup4c+totgroup4d+totgroup4e+totgroup5a+totgroup5b+
> totgroup5c+totgroup5d+totgroup5e
146664.09

. 
. di totpooradults
7558882

. di totstillpooradults
5800821

. di (totstillpooradults+totgroup4a+totgroup4b+2*totgroup4c+2*totgroup4d+totgroup4
> e+totgroup5a+totgroup5b+2*totgroup5c+2*totgroup5d+totgroup5e)
5972296.1

. di totpooradults/totadults
.11967044

. di totstillpooradults/totadults
.09183723

. di (totstillpooradults+totgroup4a+totgroup4b+2*totgroup4c+2*totgroup4d+totgroup4
> e+totgroup5a+totgroup5b+2*totgroup5c+2*totgroup5d+totgroup5e)/totadults
.09455199

. di "pov % decrease="
pov % decrease=

. di (totpooradults-(totstillpooradults+totgroup4a+totgroup4b+2*totgroup4c+2*totgr
> oup4d+totgroup4e+totgroup5a+totgroup5b+2*totgroup5c+2*totgroup5d+totgroup5e))/to
> tpooradults
.2098969

. drop totgroup* povnum* person* pop totpop

. 
. * KIDS 
. 
. drop stillpoor totstillpoor 

. 
. gen poorkids=poor*(newnumkidswt17)

. egen totpoorkids=sum(poorkids)

. di totpoorkids
11176950

. 
. gen stillpoor=poor*(poorctc21==1)*(newnumkidswt17)

. egen totstillpoor=sum(stillpoor)

. 
. di totkids
72755400

. di totpoorkids
11176950

. di totstillpoor
7727193.5

. 
. di totpoorkids/totkids
.15362365

. di (totstillpoor)/totkids
.10620783

. 
. * row 1
. gen double group=(married==0)*(incwage>0)*(v25>0)*(agi2017<80000)*(calckids>0)*(
> samplejustwomen==1)

. 
. gen double group1=newnumkidswt17*avgtax*.4*group

. egen totgroup1a=sum(group1)

. gen double group2=newnumkidswt17*avgtax*.4*group*poor

. egen totgroup2a=sum(group2)

. 
. gen double group3=newnumkidswt17*avgtax*.4*group*(poor==0)

. egen totgroup3a=sum(group3)

. 
. gen double group4=newnumkidswt17*avgtax*.4*group*(poor==0)*poorctc21nother

. egen totgroup4a=sum(group4)

. 
. gen double group5=newnumkidswt17*avgtax*.4*group*(poor==1)*(poorctc21==0)*poorct
> c21nother

. egen totgroup5a=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(303,800 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(303,800 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/newnumkidswt17+group5/newnumkidswt17)
> /(group)
(303,800 missing values generated)

. 
. egen pop=sum(group*newnumkidswt17)

. forvalues i=1/3{
  2.         egen povnum`i'a=sum(pov`i'*newnumkidswt17)
  3.         gen povrate`i'=povnum`i'a/pop
  4.         }

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 2
. gen double group=(married==0)*(incwage>0)*(v25==0)*(agi2017<80000)*(calckids>0)*
> (samplejustwomen==1)

. 
. gen double group1=newnumkidswt17*avgtax*.2*group

. egen totgroup1b=sum(group1)

. 
. gen double group2=newnumkidswt17*avgtax*.2*group*poor

. egen totgroup2b=sum(group2)

. 
. gen double group3=newnumkidswt17*avgtax*.2*group*(poor==0)

. egen totgroup3b=sum(group3)

. 
. gen double group4=newnumkidswt17*avgtax*.2*group*(poor==0)*poorctc21nother

. egen totgroup4b=sum(group4)

. 
. gen double group5=newnumkidswt17*avgtax*.2*group*(poor==1)*(poorctc21==0)*poorct
> c21nother

. egen totgroup5b=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(341,442 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(341,442 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/newnumkidswt17+group5/newnumkidswt17)
> /(group)
(341,442 missing values generated)

. 
. egen pop=sum(group*newnumkidswt17)

. forvalues i=1/3{
  2.         egen povnum`i'b=sum(pov`i'*newnumkidswt17)
  3.         gen povrate`i'=povnum`i'b/pop
  4.         }

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 3
. gen double group=(married==1)*(incwage>0)*(agi2017<80000)*(calckids>0)*(sampleju
> stwomen==1)

. 
. gen double group1=newnumkidswt17*avgtax*.2*group

. egen totgroup1c=sum(group1)

. 
. gen double group2=newnumkidswt17*avgtax*.2*group*poor

. egen totgroup2c=sum(group2)

. 
. gen double group3=newnumkidswt17*avgtax*.2*group*(poor==0)

. egen totgroup3c=sum(group3)

. 
. gen double group4=newnumkidswt17*avgtax*.2*group*(poor==0)*poorctc21nother

. egen totgroup4c=sum(group4)

. 
. gen double group5=newnumkidswt17*avgtax*.2*group*(poor==1)*(poorctc21==0)*poorct
> c21nother

. egen totgroup5c=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(302,348 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(302,348 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/newnumkidswt17+group5/newnumkidswt17)
> /(group)
(302,348 missing values generated)

. 
. egen pop=sum(group*newnumkidswt17)

. forvalues i=1/3{
  2.         egen povnum`i'c=sum(pov`i'*newnumkidswt17)
  3.         gen povrate`i'=povnum`i'c/pop
  4.         }

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 4
. gen double group=(married==1)*(totincwage>incwage)*(agi2017<80000)*(calckids>0)*
> (samplejustwomen==1)

. 
. gen double group1=newnumkidswt17*newrtwchangespouse*.05*group

. egen totgroup1d=sum(group1)

. 
. gen double group2=newnumkidswt17*newrtwchangespouse*.05*group*poor

. egen totgroup2d=sum(group2)

. 
. gen double group3=newnumkidswt17*newrtwchangespouse*.05*group*(poor==0)

. egen totgroup3d=sum(group3)

. 
. gen double group4=newnumkidswt17*newrtwchangespouse*.05*group*(poor==0)*poorctc2
> 1notspouse

. egen totgroup4d=sum(group4)

. 
. gen double group5=newnumkidswt17*newrtwchangespouse*.05*group*(poor==1)*(poorctc
> 21==0)*poorctc21notspouse

. egen totgroup5d=sum(group5)

. 
. gen pov1=(poor*group)/(group)
(278,992 missing values generated)

. gen pov2=(poor*group*(poorctc21==1))/(group)
(278,992 missing values generated)

. gen pov3=(poor*group*(poorctc21==1)+group4/newnumkidswt17+group5/newnumkidswt17)
> /(group)
(278,992 missing values generated)

. 
. egen pop=sum(group*newnumkidswt17)

. forvalues i=1/3{
  2.         egen povnum`i'd=sum(pov`i'*newnumkidswt17)
  3.         gen povrate`i'=povnum`i'd/pop
  4.         }

. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. * row 5: sum up non-mom and potential spouse
. gen person1=(incwage>0)*(agi2017<80000)*(calckids>0)*(samplenotmoms==1)

. gen person2=(totincwage>incwage)*(agi2017<80000)*(calckids>0)*(samplenotmoms==1)
> *(married==1)

. 
. gen double group1=(newnumkidswt17*person1+newnumkidswt17*person2)*avgtax*.05

. egen totgroup1e=sum(group1)

. 
. gen double group2=(newnumkidswt17*person1+newnumkidswt17*person2)*avgtax*.05*poo
> r

. egen totgroup2e=sum(group2)

. 
. gen double group3=(newnumkidswt17*person1+newnumkidswt17*person2)*avgtax*.05*(po
> or==0)

. egen totgroup3e=sum(group3)

. 
. gen double group4=(newnumkidswt17*person1)*avgtax*.05*(poor==0)*poorctc21nother+
> (newnumkidswt17*person2)*avgtax*.05*(poor==0)*poorctc21notspouse

. egen totgroup4e=sum(group4)

. 
. gen double group5=(newnumkidswt17*person1)*avgtax*.05*(poor==1)*(poorctc21==0)*p
> oorctc21nother+newnumkidswt17*person2*avgtax*.05*(poor==1)*(poorctc21==0)*poorct
> c21notspouse

. egen totgroup5e=sum(group5)

. 
. gen pov1=(poor*(person1*newnumkidswt17+person2*newnumkidswt17))

. gen pov2=(poorctc21*(person1*newnumkidswt17+person2*newnumkidswt17))

. gen pov3=(poorctc21*(person1*newnumkidswt17+person2*newnumkidswt17)+group4+group
> 5)

. 
. egen pop=sum(newnumkidswt17*person1+newnumkidswt17*person2)

. forvalues i=1/3{
  2.         egen povnum`i'e=sum(pov`i')
  3.         gen povrate`i'=povnum`i'e/pop
  4.         }

. 
. drop pov1 pov2 pov3 povrate* pop group5 group*

. 
. forvalues i=1/2{
  2.         di totgroup`i'a+totgroup`i'b+totgroup`i'c+totgroup`i'd+totgroup`i'e
  3. }
760206.49
151390.03

. di totgroup4a+totgroup4b+totgroup4c+totgroup4d+totgroup4e+totgroup5a+totgroup5b+
> totgroup5c+totgroup5d+totgroup5e
306149.15

. 
. di totkids
72755400

. di totpoorkids
11176950

. di totstillpoor
7727193.5

. di (totstillpoor+totgroup4a+totgroup4b+totgroup4c+totgroup4d+totgroup4e+totgroup
> 5a+totgroup5b+totgroup5c+totgroup5d+totgroup5e)
8033342.6

. di totpoorkids/totkids
.15362365

. di totstillpoor/totkids
.10620783

. di (totstillpoor+totgroup4a+totgroup4b+totgroup4c+totgroup4d+totgroup4e+totgroup
> 5a+totgroup5b+totgroup5c+totgroup5d+totgroup5e)/totkids
.11041576

. di "pov % decrease="
pov % decrease=

. di (totpoorkids-(totstillpoor+totgroup4a+totgroup4b+totgroup4c+totgroup4d+totgro
> up4e+totgroup5a+totgroup5b+totgroup5c+totgroup5d+totgroup5e))/totpoorkids
.28125807

. drop totgroup* povnum* person*

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/table2b.log
  log type:  text
 closed on:   3 Dec 2023, 18:17:41
----------------------------------------------------------------------------------
